package org.dut.aoptest;

import org.dut.aoptest.Controller.IFace;
import org.dut.aoptest.Controller.TestController;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ApplicationContext;

@SpringBootApplication
public class AopTestApplication {

    public static void main(String[] args) {
        ApplicationContext context = SpringApplication.run(AopTestApplication.class, args);

        //代理类
        TestController testController = (TestController) context.getBean("testController");
        System.out.println(testController);
        //代理接口
        IFace face = (IFace) context.getBean("testController2");
        System.out.println(face);

    }

}
